<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/home/include/init_home.jsp" %>
<%@ page import="com.welfare.admin.service.*" %>
<%
	
	String service_id		= StringUtil.nvl(request.getParameter("service_id"));

	HashMap infos = new HashMap();
	infos.put("service_id",	service_id);

   
	ServiceDAO dao 		= new ServiceDAO();
	HashList list 		= dao.selectServiceInfo(infos);		
	HashList docuList	= dao.selectServiceDocuList(infos);

	 
	infos.put("ip_addr", request.getRemoteAddr());
	infos.put("referer", request.getHeader("referer"));
	infos.put("user_agent", request.getHeader("user-agent"));
	dao.insertServiceCount(infos);

	
	int indexNo = 1;

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<title>복지자원검색</title>
<link rel="stylesheet" type="text/css" href="./css/m_main.css" /></head>
<body>
    <div id="header">
        <div id="Logo01">
	        <div class="subLogo">
	            <h1><img src="./images/mobile/title02_m.gif" alt="서대문구 맞춤복지 검색서비스" /></h1>
	        </div>    
        </div>
        <div>
         <div id="subcontentsWrap">
        <div>
            <h2 class="title02"><%= list.get("service_name", 0) %></h2>
            <ol class="viewText01">            
                <%	if (!"".equals(list.get("summary", 0))) { %>
                <li>
                	<strong><%=indexNo++%>. 개요</strong>
                    <p><%= list.getToBr("summary", 0) %></p>
                </li>
           	<%	} %>
           	<%	if (!"".equals(list.get("selection", 0))) { %>
                <li>
                	<strong><%=indexNo++%>. 선정기준</strong>
                   	<p><%= list.getToBr("selection", 0) %></p>
                </li>
           	<%	} %>
           	<%	if (!"".equals(list.get("service_info", 0))) { %>
                <li><strong><%=indexNo++%>. 서비스내용</strong>
                    <p><%= list.get("service_info", 0) %></p>
                </li>
           	<%	} %>
           	<%	if (!"".equals(list.get("price_info", 0))) { %>
                <li><strong><%=indexNo++%>. 금액</strong>
                    <p><%= list.getToBr("price_info", 0) %></p>
                </li>
           	<%	} %>
           	<%	if (!"".equals(list.get("document", 0)) || docuList.size() > 0) { %>
                <li><strong><%=indexNo++%>. 구비서류</strong>
                    <p><%= list.getToBr("document", 0) %>
			<%	for (int i = 0; i < docuList.size(); i++) { %>
			<%		if ("".equals(docuList.get("file_id",i))) { %>
						<span class="file_download"><%= docuList.get("docu_name",i) %></span><%= i<docuList.size()-1?",":"" %>
			<%		} else { %>
						<span class="file_download">
							<a href="./common/fileDownload.jsp?file_id=<%= docuList.get("file_id", i) %>&file_name=<%=docuList.getEncode("docu_name",i) %>">
							<img src="./images/common/<%= StringUtil.getFileExtIcon(docuList.get("file_ext",i)) %>"/><%= docuList.get("docu_name",i) %></a><%= i<docuList.size()-1?",":"" %>
						</span>
			<%		} %>	
			<%	} %>	
						</p>
                </li>
           	<%	} %>
           	<%	if (!"".equals(list.get("dept_name", 0))) { %>
                <li><strong><%=indexNo++%>. 담당부서</strong>
                    <p><%= list.getToBr("dept_name", 0) %></p>
                </li>
           	<%	} %>
           	<%	if (!"".equals(list.get("dept_tel", 0))) { %>
                <li><strong><%=indexNo++%>. 문의처(담당자)</strong>
                    <p><%= list.getToBr("dept_tel", 0) %></p>
                </li>
           	<%	} %>
            <%	if (!"".equals(list.get("address", 0))) { %>
                <li><strong><%=indexNo++%>. 약도</strong>
                    <p><%= list.get("address", 0) %> [<a class="link" href="http://map.naver.com/?query=<%= list.get("address", 0) %>&sm=top_hty&fbm=1&ie=utf8" target="_blank" title="새창으로 열림">네이버지도</a>]</p>
                </li>             
          	<%	} %>             
            </ol>
        </div>
    </div>
        </div>
         <!-- footer 시작 -->
        <div id="footer">
            <ul>
                <li><a href="#header"><img src="./images/mobile/m_btn_top.gif" alt="맨위로" /></a></li>
                <li><a href="http://bokji.sdm.go.kr/search.jsp"><img src="./images/mobile/m_btn_pc.gif" alt="pc버전 바로가기" /></a></li>
            </ul>
       <address>2014 Copyright 서대문구청 All Rights Reserved</address>
       </div>
        <!-- footer 끝 -->
    </div>
</body>
</html>